/*
 * @Author: your name
 * @Date: 2022-04-03 16:59:51
 * @LastEditTime: 2022-04-03 23:01:41
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \drivingTow\src\trainees\entities\trainee.entity.ts
 */
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
import { TraineeInfoDto } from "../dto/create-trainee.dto";

@Entity('Trainee')
export class Trainee {
  @PrimaryGeneratedColumn()
  id:number;

  @Column() //学员ID
  trainee:string

  @Column() // 学员名字
  traineeName:string

  @Column() // 参与时间
  attendTime:string

  @Column('simple-enum',{enum:['progress ','Finish','cancel'],default:'progress'}) // 状态
  status:string

  @Column() // 教练ID
  coach:string

  @Column() // 教练电话
  telephone:string

  @Column() // 预约时间
  create_time: string;

  @Column() // 预约科目
  catogary:string;

  toResponseObject(): TraineeInfoDto {
    let responseObj: TraineeInfoDto = {
      ...this,
    };
    return responseObj;
  }
}
